package com.csweimei.rentmanagementtreasure.http.entity;

import android.view.View;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class CustomerCenterBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("userid")
        private int userid;
        @SerializedName("headImg")
        private String headImg;
        @SerializedName("nickname")
        private String nickname;
        @SerializedName("customCount")
        private int customCount;
        @SerializedName("cList")
        private List<CListDTO> cList;

        public int getUserid() {
            return userid;
        }

        public void setUserid(int userid) {
            this.userid = userid;
        }

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getCustomCount() {
            return "共"+customCount+"位";
        }

        public void setCustomCount(int customCount) {
            this.customCount = customCount;
        }

        public List<CListDTO> getCList() {
            return cList;
        }

        public void setCList(List<CListDTO> cList) {
            this.cList = cList;
        }

        public static class CListDTO {
            @SerializedName("id")
            private int id;
            @SerializedName("customImg")
            private String customImg;
            @SerializedName("name")
            private String name;
            @SerializedName("customType")
            private String customType;
            @SerializedName("sex")
            private String sex;
            @SerializedName("phone")
            private String phone;
            @SerializedName("addtime")
            private String addtime;


            public int showAj() {
                if (customType.contains("A")){
                    return View.VISIBLE;
                }else {
                    return View.GONE;
                }
            }

            public int showBj() {
                if (customType.contains("B")){
                    return View.VISIBLE;
                }else {
                    return View.GONE;
                }
            }

            public int showCj() {
                if (customType.contains("C")){
                    return View.VISIBLE;
                }else {
                    return View.GONE;
                }
            }



            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getCustomImg() {
                return customImg;
            }

            public void setCustomImg(String customImg) {
                this.customImg = customImg;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getCustomType() {
                return customType;
            }

            public void setCustomType(String customType) {
                this.customType = customType;
            }

            public String getSex() {
                return sex;
            }

            public void setSex(String sex) {
                this.sex = sex;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public String getAddtime() {
                return ValidateUtils.getTimeByType(addtime,ValidateUtils.TIME_YMD)+" 创建";
            }

            public void setAddtime(String addtime) {
                this.addtime = addtime;
            }
        }
    }
}
